<div class="white_box">
    <div class="box-body">
        <div class="row row-sm">
            <div class="col-sm-4">
                <div class="row row-sm">
                    <div class="col-xs-6 col-sm-6 row_no_pad_right">
                        <a class="btn btn-danger btn-sm btn-block" href="<?php echo $url; ?>"><i
                                class="fa fa-arrow-left"></i>
                            返回<span class="hidden-xs hidden-sm">壁纸详情</span></a>
                    </div>
                    <div class="col-xs-6 col-sm-6">
                        <a data-msg="正在下载壁纸" class="btn btn-success btn-sm btn-block starting_download"
                           href="<?php echo $this->route_links->build_link('wallpaper_preview_download', $search_replace); ?>"><i
                                class="fa fa-download"></i> 下载壁纸</a>
                    </div>
                </div>
            </div>
            <div class="col-sm-4 m_t_5">
                壁纸尺寸: <b><?php echo $width; ?></b> x <b><?php echo $height; ?></b>
            </div>
            <div class="col-sm-4 m_t_10">
                <?php if ($colors) { ?>
                    <div class="wallpaper_colors text-right-no-xs">
                        <?php foreach ($colors as $i => $color_data) { ?>
                            <?php if ($i >= 16) break; ?>
                            <a href="<?php echo $this->route_links->build_link('search_page') . '?color=' . $color_data->hex_code; ?>">
                            <span data-toggle="tooltip" data-placement="bottom"
                                  data-original-title="<?php echo round($color_data->count * 100, 2); ?>%"
                                  title="<?php echo round($color_data->count * 100, 2); ?>%"
                                  style="background: #<?php echo $color_data->hex_code; ?>" class="color_block"></span>
                            </a>
                        <?php } ?>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>

<?php echo $this->language->get_ad(6); ?>

<?php if ($previous_next) { ?>
    <div class="row">
        <div class="col-xs-6">
            <?php if (isset($previous_next['previous'])) { ?>
                <?php $link_build = array('{C_SLUG_FULL}' => $previous_next['previous']->cFullSlug, '{C_SLUG}' => $previous_next['previous']->category_slug, '{W_SLUG}' => $previous_next['previous']->wallpaper_slug, '{W_HASH}' => $previous_next['previous']->wallpaper_hash, '{R_WIDTH}' => $width, '{R_HEIGHT}' => $height) ?>
                <a data-toggle="tooltip" data-placement="bottom"
                   title="上一张: <?php echo $previous_next['previous']->wallpaper_name; ?>"
                   href="<?php echo $this->route_links->build_link('wallpaper_preview', $link_build); ?>"><i
                        class="fa fa-backward"></i></a>
            <?php } ?>
        </div>
        <div class="col-xs-6">
            <?php if (isset($previous_next['next'])) { ?>
                <div class="text-right">
                    <?php $link_build = array('{C_SLUG_FULL}' => $previous_next['next']->cFullSlug, '{C_SLUG}' => $previous_next['next']->category_slug, '{W_SLUG}' => $previous_next['next']->wallpaper_slug, '{W_HASH}' => $previous_next['next']->wallpaper_hash, '{R_WIDTH}' => $width, '{R_HEIGHT}' => $height) ?>
                    <a data-toggle="tooltip" data-placement="bottom"
                       title="下一张: <?php echo $previous_next['next']->wallpaper_name; ?>"
                       href="<?php echo $this->route_links->build_link('wallpaper_preview', $link_build); ?>"><i
                            class="fa fa-forward"></i></a>
                </div>
            <?php } ?>
        </div>
    </div>
    <div class="clearfix"></div>
<?php } ?>
<br/>
<img class="thumbnail img-responsive img-center m_t_10" src="<?php echo $image; ?>" alt="<?php echo $wallpaper->wallpaper_name; ?>"/>